﻿#ifndef MYCOMPONENT_H
#define MYCOMPONENT_H

#include <QWidget>
#include "mycomponentapi.h"

namespace Ui {
class MyComponent;
}

class MYCOMPONENTAPI MyComponent : public QWidget
{
    Q_OBJECT

    Q_PROPERTY(QString m_le_text READ getText WRITE setText)
    //Q_PROPERTY(QString m_cb_selectedText READ getSelectedText WRITE setSelectedText)
    Q_PROPERTY(int m_cb_selectedIndex READ getSelectedIndex WRITE setSelectedIndex)

public:
    explicit MyComponent(QWidget *parent = nullptr);
    ~MyComponent();

    QString getText();
    void setText(QString);

    QString getSelectedText();
    void setSelectedText(QString);

    int getSelectedIndex();
    void setSelectedIndex(int);

private:
    Ui::MyComponent *ui;

    QString m_le_text;
    QString m_cb_selectedText;
    int m_cb_selectedIndex;


Q_SIGNALS:
    void selectBoxSelectedSig(int, QString);

private Q_SLOTS:
    void on_combox_selected();
};

#endif // MYCOMPONENT_H
